1. Field of the Invention
This invention relates to the saving, restoring and clearing of registers used for the processing of vectors by one program when switching occurs to another program. More particularly, this invention relates to the selective saving and restoring of vector registers in order to reduce the time for switching between programs.
2. Prior Art
Vector processing is discussed in a book by P. M. Kogge entitled "Architecture of Pipelined Computers", published by McGraw-Hill and Hemisphere Publishers, 1981.
IBM Technical Disclosure Bulletin, Vol. 24, No. 8, January 1982, pages 4431-4432, entitled "Status Save/Restore/Modify of a Unit of Work" by L. C. Hitch discloses the status save/restore/modify services which permit a unit of work to signal the saving and restoring of its own status. The unit of work may request the saving of its current status and then process other work that it has. At a later time it may request that the previously saved status be restored.
IBM System/370 Principles of Operation manual, GA22-7000-8, No. S370-01, broadly discusses interruptions with respect to scalar quantities.
Generally, in the prior art, programs using vector instructions are allowed to run for long periods of time or until they are completed in order to minimize the overhead (time) involved in switching between programs. Switching between programs will only be permitted to occur when a vector instruction has completed. In this case, vector instructions are not interrupted.
It is an object of this invention to reduce the time, i.e. the overhead, for switching between programs when switching occurs during the execution of an interruptible vector instruction or before a program containing the instruction has ended.
It is an object of this invention to save and restore only vector registers that are in use.
It is a further object of this invention to distinguish between in-use vector registers that were simply restored and in-use vector registers that were restored and subsequently changed.
It is another object of this invention to save only in-use vector registers, whose contents were changed, and which were previously restored from the same area in memory.
Another object of this invention is to utilize save and restore instructions that are interruptible.